package org.snail.attendence.bean;

import lombok.Data;
import org.snail.base.BaseParam;
import org.snail.excel.annotation.ExcelBean;
import org.snail.excel.annotation.ExcelColumn;

@Data
@ExcelBean
public class WxLeaveDO extends BaseParam {
    private Integer empId;
    @ExcelColumn(name = "workNum", position = 0, columnName = "佰钧成工号")
    private String workNum;
    @ExcelColumn(name = "employeeName", position = 1, columnName = "姓名")
    private String employeeName;
    @ExcelColumn(name = "department", position = 2, columnName = "部门")
    private String department;
    @ExcelColumn(name = "leaveType", position = 3, columnName = "请假类型")
    private String leaveType;    //请假类型
    @ExcelColumn(name = "leaveDate", position = 4, columnName = "请假日期")
    private String leaveDate;      //请假日期
    @ExcelColumn(name = "realHour", position = 5, columnName = "请假时长（小时）")
    private String realHour;      //实际小时数
    @ExcelColumn(name = "status", position = 6, columnName = "状态")
    private String status;      //状态
    @ExcelColumn(name = "comment", position = 7, columnName = "备注")
    private String comment;      //备注
    private Double countHour;   //核算请假时间总和
    private Double overHour;    //调休时间总和
    private String aliNumber;   //外包工号
    private int statusNo;       //做预览 0相同  1不同
    private String belongsDept;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof WxLeaveDO)) return false;
        if (!super.equals(o)) return false;

        WxLeaveDO wxLeaveDO = (WxLeaveDO) o;

        if (!getWorkNum().equals(wxLeaveDO.getWorkNum())) return false;
        if (!getEmployeeName().equals(wxLeaveDO.getEmployeeName())) return false;
        if (!getDepartment().equals(wxLeaveDO.getDepartment())) return false;
        if (!getLeaveType().equals(wxLeaveDO.getLeaveType())) return false;
        if (!getLeaveDate().equals(wxLeaveDO.getLeaveDate())) return false;
        if (!getRealHour().equals(wxLeaveDO.getRealHour())) return false;
        if (!getStatus().equals(wxLeaveDO.getStatus())) return false;
        return getComment().equals(wxLeaveDO.getComment());

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + getWorkNum().hashCode();
        result = 31 * result + getEmployeeName().hashCode();
        result = 31 * result + getDepartment().hashCode();
        result = 31 * result + getLeaveType().hashCode();
        result = 31 * result + getLeaveDate().hashCode();
        result = 31 * result + getRealHour().hashCode();
        result = 31 * result + getStatus().hashCode();
        result = 31 * result + getComment().hashCode();
        return result;
    }
}
